
import OperationBtn from '../component/operationBtn'
import { Tag, Typography, Tooltip } from 'antd';
import { EnvironmentOutlined } from '@ant-design/icons';


const { Text } = Typography;



//网点列
export const columns = [
    {
        title: '序号',
        dataIndex: 'serial',
        key: 'serial',
        align: 'center',
        width: 30,
        ellipsis: true,
        render: (text) => {
            return (
                <div>
                    <Text type="strong">{text}</Text>
                </div>

            )
        },
    },
    {
        title: '更新时间',
        dataIndex: 'updateTime',
        key: 'updateTime',
        align: 'center',
        width: 100,
        ellipsis: true,
        render: (text) => {
            return (
                <div>
                    <Text type="strong">{text}</Text>
                </div>

            )
        },
    },
    {
        title: '网点名称',
        dataIndex: 'branchName',
        key: 'branchName',
        align: 'center',
        width: 150,
        ellipsis: true,
        render: (text) => {
            return (
                <div>
                    <Text type="strong">{text}</Text>
                </div>

            )
        },
    },

    {
        title: '银行名称',
        dataIndex: 'bankName',
        key: 'bankName',
        align: 'center',
        width: 100,
        ellipsis: true,
        render: (text) => {
            return (
                <Tag bordered={false} color="blue">{text}</Tag>
            )
        },
    },
    {
        title: '网点地址',
        dataIndex: 'branchAddress',
        key: 'branchAddress',
        width: 200,
        align: 'center',
        render: (text) => (
            <Tooltip title={text}>
                <div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
                    <Tag icon={<EnvironmentOutlined />} color="magenta" style={{ maxWidth: '100%' }}>
                        {text}
                    </Tag>
                </div>
            </Tooltip>
        ),
    },
    {
        title: '所属区县',
        dataIndex: 'belongDistricts',
        key: 'belongDistricts',
        width: 70,
        align: 'center',
        ellipsis: true,
        render: (text) => {
            return (
                <div>
                    <Text underline>{text}</Text>
                </div>
            )
        },
    },
    {
        title: '操作',
        dataIndex: 'operation',
        key: 'operation',
        align: 'center',
        width: 120,
        render: (itemInfo) => {
            return (
                <OperationBtn itemInfo={itemInfo}></OperationBtn>
            )
        },
    },
];

export default columns;